/**
 * @file wa_malloc.h
 *
 */

#ifndef _WA_MALLOC_H
#define _WA_MALLOC_H

#ifdef __cplusplus
extern "C" {
#endif


	/*********************
	 *      INCLUDES
	 *********************/
#include "wa_conf.h"
#include "wa_misc.h"
#include <string.h>
#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
/*********************
*      DEFINES
*********************/



/**********************
*      TYPEDEFS
**********************/
typedef struct
{
	void (*init)(void);		//init callback
	int (*perused)(void);	//mem perused callback
	uint8_t* membase;		//mem pool 
	uint16_t* memmap;		//mem state table
	wa_result memrdy;			//mem is ready
}wa_mem_dev;
/**********************
* GLOBAL PROTOTYPES
**********************/
void wa_memset(void* s, uint8_t c, uint32_t count);
void wa_memcpy(void* des, void* src, uint32_t n);
void wa_mem_init(void);
int wa_mem_perused(void);
void* wa_malloc(uint32_t size);
void wa_free(void* ptr);
void* wa_realloc(void* ptr, uint32_t size);

/**********************
*      MACROS
**********************/

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif

